package com.qianji.petmall.order.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qianji.common.to.seckill.SeckillCartTo;
import com.qianji.common.utils.PageUtils;
import com.qianji.petmall.order.entity.OrderEntity;
import com.qianji.petmall.order.vo.*;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author xiaoxin
 * @email 485350978@qq.com
 * @date 2022-01-07 15:24:17
 */

public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo toTrade() throws ExecutionException, InterruptedException;

    OrderResponseVo submitOrder(OrderSubmitVO submitVO) throws ExecutionException, InterruptedException;

    OrderEntity getOrderItemStatus(String orderSn);

    void closeOrder(OrderEntity order);

    PayVo payOrder(String orderSn);

    PageUtils getListOrderItem(Map<String, Object> map);

    boolean aliAsyncNotify(PayAsyncVo payAsyncVo, HttpServletRequest request) throws UnsupportedEncodingException, AlipayApiException;

    void CreatSeckillCart(SeckillCartTo cart);
}

